$(function () {
    //款项类型
    $("#form_fksh").find("[idVal='fksh_kxyt_id']").sjzdcombobox("kxyt");

    //票据类型
    $("#form_fksh").find("[idVal='fksh_pjlx_id']").sjzdcombobox("pjlx");

    //回款类型
    $("#form_fksh").find("[idVal='fksh_hklx_id']").sjzdcombobox("hklx");


    var type = $("[name='fksh.sfklx']:checked").val();
    if (type == 1) {
        $("#fksh_kh").css("display", "none");
        $("#fksh_gys").css("display", "block");
        $("#fklx3").css("display", "none");
        $("#fklx4").css("display", "none");
        $("#fklx1").css("display", "inline");
        $("#fklx2").css("display", "inline");
    } else {
        $("#fksh_kh").css("display", "block");
        $("#fksh_gys").css("display", "none");
        $("#fklx3").css("display", "inline");
        $("#fklx4").css("display", "inline");
        $("#fklx1").css("display", "none");
        $("#fklx2").css("display", "none");
    }
    $("[name='fksh.sfklx']").change(function () {
        var type = $(this).val();
        if (type == 1) {
            $("#fksh_kh").css("display", "none");
            $("#fksh_gys").css("display", "block");
            $("#fklx3").css("display", "none");
            $("#fklx4").css("display", "none");
            $("#fklx1").css("display", "inline");
            $("#fklx2").css("display", "inline");
        } else {
            $("#fksh_kh").css("display", "block");
            $("#fksh_gys").css("display", "none");
            $("#fklx3").css("display", "inline");
            $("#fklx4").css("display", "inline");
            $("#fklx1").css("display", "none");
            $("#fklx2").css("display", "none");
        }
    });

        $("#fksh_gldw_id").gsjgqczcombobox({
            onSuccess : function(){
                $("#fksh_gldw_id").zcombobox("setMap",{ id:$("#fkdw_id").val(),qc:$("#fkdw_jc").val()})
            }
        });

  });